package com.kaiwukj.android.ufamily.mvp.ui.widget;

import android.graphics.Rect;
import android.view.View;

import com.blankj.utilcode.util.ConvertUtils;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

/**
 * 缴费详情页  分割线
 * Created by Administrator on 2019/10/25
 */
public class PayFeeItemDecoration extends RecyclerView.ItemDecoration {

    @Override
    public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
        int pos = parent.getChildLayoutPosition(view);

        if (pos == 4) {

            outRect.top = ConvertUtils.dp2px(7);

        } else {
            outRect.bottom = ConvertUtils.dp2px(0.5f);
        }

    }
}
